<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      /* 定位黑色盒子 */
      .black {
        width: 100px;
        height: 100px;
        background-color: black;
        top: 220px;
        position: absolute;
      }
      /* 定位蓝色盒子 */
      .skyblue {
        width: 300px;
        height: 300px;
        background-color: skyblue;
        left: 50px;
        position: relative;
      }
      /* 定位绿色盒子 */
      .lightgreen {
        width: 180px;
        height: 180px;
        background-color: lightgreen;
        position: relative;
        left: 80px;
        top: -50px;
      }
      /* 定位红色盒子 */
      .red {
        height: 300px;
        width: 600px;
        background-color: red;
        position: relative;
        top: -400px;
        left: 165px;
      }
      /* 定位黄色盒子 */
      .yellow {
        height: 50px;
        width: 100px;
        background-color: yellow;
        position: absolute;
        bottom: 0;
        right: 0;
      }
    </style>
  </head>
  <body>
    <div class="big">
      <div class="skyblue"></div>
      <div class="black"></div>
      <div class="lightgreen"></div>
      <!-- 用红色盒子包着黄色盒子，子绝父相 -->
      <div class="red">
          <div class="yellow"></div>
        </div>
      </div>
    </div>
  </body>
</html>
